WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::CaptureMotion Class Reference

Base class for motion Captures. More...

#include <core/capture/capture_motion.h>

Inheritance diagram for wolf::CaptureMotion:
[legend]

Public Member Functions

 CaptureMotion (const std::string &_type, const TimeStamp &_ts, SensorBasePtr _sensor_ptr, const Eigen::VectorXd &_data, CaptureBasePtr _capture_origin_ptr, const TypeComposite &_state_types={}, const VectorComposite &_state_vectors={}, const PriorComposite &_state_priors={})
 
 CaptureMotion (const std::string &_type, const TimeStamp &_ts, SensorBasePtr _sensor_ptr, const Eigen::VectorXd &_data, const Eigen::MatrixXd &_data_cov, CaptureBasePtr _capture_origin_ptr, const TypeComposite &_state_types={}, const VectorComposite &_state_vectors={}, const PriorComposite &_state_priors={})
 
 ~CaptureMotion () override
 
bool isMotion () const override
 Is a motion if there is motion detected. More...
 
const Eigen::VectorXd & getData () const
 
const Eigen::MatrixXd & getDataCovariance () const
 
void setData (const Eigen::VectorXd &_data)
 
void setDataCovariance (const Eigen::MatrixXd &_data_cov)
 
MotionBuffer & getBuffer ()
 
const MotionBuffer & getBuffer () const
 
Eigen::VectorXd getCalibrationPreint () const
 
void setCalibrationPreint (const Eigen::VectorXd &_calib_preint)
 
Eigen::MatrixXd getJacobianCalib () const
 
Eigen::MatrixXd getJacobianCalib (const TimeStamp &_ts) const
 
Eigen::VectorXd getDeltaPreint () const
 
Eigen::VectorXd getDeltaPreint (const TimeStamp &_ts) const
 
Eigen::MatrixXd getDeltaPreintCov () const
 
Eigen::MatrixXd getDeltaPreintCov (const TimeStamp &_ts) const
 
CaptureBasePtr getOriginCapture ()
 
CaptureBaseConstPtr getOriginCapture () const
 
void setOriginCapture (CaptureBasePtr _capture_origin_ptr)
 
bool containsTimeStamp (const TimeStamp &_ts, double _time_tolerance) const
 
void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const override
 Print the header information of the capture. More...
 
- Public Member Functions inherited from wolf::CaptureBase
 CaptureBase (const std::string &_type, const TimeStamp &_ts, SensorBasePtr _sensor_ptr=nullptr, const TypeComposite &_state_types={}, const VectorComposite &_state_vectors={}, const PriorComposite &_state_priors={})
 Constructor. More...
 
 ~CaptureBase () override=default
 
void remove (bool viral_remove_parent_without_children=false) override
 Remove the capture. More...
 
bool hasChildren () const override
 Check if the capture has any children. More...
 
virtual FactorBasePtr emplaceDriftFactor (CaptureBasePtr _capture_origin, char _key, bool _apply_loss_function)
 Emplace a FactorBlockDifference with zero difference between the state _key of this capture and _capture_origin. More...
 
virtual bool isMotion () const
 Is a motion if there is motion detected. More...
 
bool process ()
 Process the capture. More...
 
unsigned int id () const override
 
TimeStamp getTimeStamp () const
 
void setTimeStamp (const TimeStamp &_ts)
 
void setTimeStampToNow ()
 
FrameBaseConstPtr getFrame () const
 
FrameBasePtr getFrame ()
 
FeatureBaseConstPtrList getFeatureList () const
 
FeatureBasePtrList getFeatureList ()
 
bool hasFeature (const FeatureBaseConstPtr &_feature) const
 
FactorBaseConstPtrList getFactorList () const
 
FactorBasePtrList getFactorList ()
 
void getFactorList (FactorBaseConstPtrList &_fac_list) const
 
void getFactorList (FactorBasePtrList &_fac_list)
 
SensorBaseConstPtr getSensor () const
 
SensorBasePtr getSensor ()
 
virtual void setSensor (const SensorBasePtr sensor_ptr)
 
StateBlockConstPtr getStateBlock (const char &_key) const override
 
StateBlockPtr getStateBlock (const char &_key) override
 
StateBlockConstPtr getSensorP () const
 
StateBlockPtr getSensorP ()
 
StateBlockConstPtr getSensorO () const
 
StateBlockPtr getSensorO ()
 
StateBlockConstPtr getSensorIntrinsic () const
 
StateBlockPtr getSensorIntrinsic ()
 
void fix () override
 
void unfix () override
 
void link (FrameBasePtr _frm_ptr)
 Link the capture to a frame. More...
 
virtual void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const
 Print the header information of the capture. More...
 
void print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const
 Print the capture details. More...
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 Perform a local check on the capture. More...
 
bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 Check the capture. More...
 
CaptureBasePtr shared_from_this_capture ()
 
CaptureBaseConstPtr shared_from_this_capture () const
 
- Public Member Functions inherited from wolf::NodeStateBlocks
 NodeStateBlocks (const std::string &_category, const std::string &_type, const TypeComposite &_state_types, const VectorComposite &_state_vectors, const PriorComposite &_state_priors)
 Constructor. More...
 
virtual ~NodeStateBlocks ()
 
virtual YAML::Node toYaml () const
 
StateKeys getKeys () const
 
TypeComposite getStateTypes () const
 
bool has (const char &_sb_key) const
 
bool has (const std::string &_keys) const
 
virtual unsigned int id () const =0
 
std::map< char, StateBlockConstPtr > getStateBlockMap () const
 
std::map< char, StateBlockPtr > getStateBlockMap ()
 
std::vector< StateBlockConstPtr > getStateBlockVec () const
 
std::vector< StateBlockPtr > getStateBlockVec ()
 
StateBlockConstPtr getP () const
 
StateBlockConstPtr getO () const
 
StateBlockPtr getP ()
 
StateBlockPtr getO ()
 
virtual void fix ()
 
virtual void unfix ()
 
virtual bool isFixed () const
 
StateBlockPtr emplaceStateBlock (const char key, const std::string &_type, const Eigen::VectorXd &_vector, const bool &_fixed)
 Emplace a state block. More...
 
StateBlockPtr emplaceStateBlockZero (const char key, const std::string &_type, const bool &_fixed)
 Emplace a state block with zero state. More...
 
bool hasStateBlock (const StateBlockConstPtr &_sb) const
 
bool setStateBlock (const char _sb_key, const StateBlockPtr &_sb)
 
bool stateBlockKey (const StateBlockConstPtr &_sb, char &_key) const
 
virtual StateBlockConstPtr getStateBlock (const char &_sb_key) const
 
virtual StateBlockPtr getStateBlock (const char &_sb_key)
 
void setProblem (ProblemPtr _problem) override
 
virtual void remove (bool viral_remove_parent_without_children=false)
 
bool hasChildren () const override
 
void emplaceFactorStateBlock (const char &_key, const Eigen::VectorXd &_x, const Eigen::MatrixXd &_cov, unsigned int _start_idx=0)
 Add an absolute factor to a parameter. More...
 
void emplacePriors ()
 
FactorBaseConstPtrSet getFactoredBySet () const
 
FactorBasePtrSet getFactoredBySet ()
 
void getFactoredBySet (FactorBaseConstPtrSet &_fac_set) const
 
void getFactoredBySet (FactorBasePtrSet &_fac_set)
 
FactorBaseConstPtrSet getSensoryFactorSet () const
 
FactorBasePtrSet getSensoryFactorSet ()
 
std::map< char, FactorBaseConstPtr > getPriorFactorMap () const
 
std::map< char, FactorBasePtr > getPriorFactorMap ()
 
FactorBaseConstPtr getPriorFactor (char) const
 
FactorBasePtr getPriorFactor (char)
 
FactorBaseConstPtrList getFactorsOf (ProcessorBaseConstPtr _processor_ptr, const std::string &type="") const
 
FactorBasePtrList getFactorsOf (ProcessorBasePtr _processor_ptr, const std::string &type="")
 
bool hasFactor (FactorBaseConstPtr _fac) const
 
VectorComposite getState (const StateKeys &_keys="") const
 
void setState (const VectorComposite &_state, const bool _notify=true)
 
void setState (const Eigen::VectorXd &_state, const StateKeys &_keys, const std::list< SizeEigen > &_sizes, const bool _notify=true)
 
void setState (const Eigen::VectorXd &_state, const StateKeys &_keys, const bool _notify=true)
 
void setState (const StateKeys &_keys, const std::list< Eigen::VectorXd > &_vectors, const bool _notify=true)
 
Eigen::VectorXd getStateVector (const StateKeys &_keys) const
 
unsigned int getSize (const StateKeys &_keys="") const
 
unsigned int getLocalSize (const StateKeys &_keys="") const
 
bool getCovariance (const StateKeys &_keys, Eigen::MatrixXd &_cov) const
 
void perturb (double amplitude=0.01)
 perturb all states states with random noise following an uniform distribution in [ -amplitude, amplitude ] More...
 
bool isCapture () const
 
bool isFrame () const
 
bool isLandmark () const
 
bool isSensor () const
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 
virtual ~NodeBase ()=default
 
unsigned int nodeId () const
 
std::string getCategory () const
 
std::string getType () const
 
std::string getName () const
 
bool isRemoving () const
 
virtual bool hasChildren () const =0
 
void setType (const std::string &_type)
 
void setName (const std::string &_name)
 
ProblemConstPtr getProblem () const
 
ProblemPtr getProblem ()
 

Additional Inherited Members

- Static Public Member Functions inherited from wolf::CaptureBase
template<typename classType , typename... T>
static std::shared_ptr< classType > emplace (FrameBasePtr _frm_ptr, T &&... all)
 Emplace a new capture of type classType. More...
 
- Protected Member Functions inherited from wolf::CaptureBase
void setProblem (ProblemPtr _problem) override final
 
- Protected Member Functions inherited from wolf::NodeStateBlocks
virtual void removeStateBlock (const char &_sb_key)
 
void transform (const VectorComposite &_transformation)
 
void printState (bool _factored_by, bool _metric, bool _state_blocks, std::ostream &_stream, std::string _tabs) const
 
CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs) const
 
virtual void setProblem (ProblemPtr _prob_ptr)
 
- Protected Attributes inherited from wolf::CaptureBase
unsigned int capture_id_
 
TimeStamp time_stamp_
 Time stamp. More...
 
- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Text label identifying the type or subcategory of node ("Pin Hole", "Point 2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Detailed Description

Base class for motion Captures.

This class implements Captures for sensors integrating motion.

The raw data of this type of captures is required to be in the form of a vector --> see attribute data_.

It contains a MotionBuffer buffer of Motion pre-integrated motions that is being filled by the motion processors (deriving from ProcessorMotion) --> See Motion, MotionBuffer, and ProcessorMotion.

This buffer contains the integrated motion:

  • since the last key-Frame
  • until the frame of this capture.

Once a keyframe is generated, this buffer is frozen and kept in the Capture for eventual later uses. It is then used to compute the factor that links the Frame of this capture to the previous key-frame in the Trajectory.

Constructor & Destructor Documentation

◆ CaptureMotion() [1/2]

wolf::CaptureMotion::CaptureMotion ( const std::string &  _type,
const TimeStamp &  _ts,
SensorBasePtr  _sensor_ptr,
const Eigen::VectorXd &  _data,
CaptureBasePtr  _capture_origin_ptr,
const TypeComposite &  _state_types = {},
const VectorComposite &  _state_vectors = {},
const PriorComposite &  _state_priors = {} 
)

◆ CaptureMotion() [2/2]

wolf::CaptureMotion::CaptureMotion ( const std::string &  _type,
const TimeStamp &  _ts,
SensorBasePtr  _sensor_ptr,
const Eigen::VectorXd &  _data,
const Eigen::MatrixXd &  _data_cov,
CaptureBasePtr  _capture_origin_ptr,
const TypeComposite &  _state_types = {},
const VectorComposite &  _state_vectors = {},
const PriorComposite &  _state_priors = {} 
)

◆ ~CaptureMotion()

wolf::CaptureMotion::~CaptureMotion ( )
override

Member Function Documentation

◆ containsTimeStamp()

bool wolf::CaptureMotion::containsTimeStamp ( const TimeStamp &  _ts,
double  _time_tolerance 
) const

◆ getBuffer() [1/2]

MotionBuffer & wolf::CaptureMotion::getBuffer ( )
inline

◆ getBuffer() [2/2]

const MotionBuffer & wolf::CaptureMotion::getBuffer ( ) const
inline

◆ getCalibrationPreint()

Eigen::VectorXd wolf::CaptureMotion::getCalibrationPreint ( ) const
inline

◆ getData()

const Eigen::VectorXd & wolf::CaptureMotion::getData ( ) const
inline

◆ getDataCovariance()

const Eigen::MatrixXd & wolf::CaptureMotion::getDataCovariance ( ) const
inline

◆ getDeltaPreint() [1/2]

Eigen::VectorXd wolf::CaptureMotion::getDeltaPreint ( ) const
inline

◆ getDeltaPreint() [2/2]

Eigen::VectorXd wolf::CaptureMotion::getDeltaPreint ( const TimeStamp &  _ts) const
inline

◆ getDeltaPreintCov() [1/2]

Eigen::MatrixXd wolf::CaptureMotion::getDeltaPreintCov ( ) const
inline

◆ getDeltaPreintCov() [2/2]

Eigen::MatrixXd wolf::CaptureMotion::getDeltaPreintCov ( const TimeStamp &  _ts) const
inline

◆ getJacobianCalib() [1/2]

Eigen::MatrixXd wolf::CaptureMotion::getJacobianCalib ( ) const
inline

◆ getJacobianCalib() [2/2]

Eigen::MatrixXd wolf::CaptureMotion::getJacobianCalib ( const TimeStamp &  _ts) const
inline

◆ getOriginCapture() [1/2]

wolf::CaptureBasePtr wolf::CaptureMotion::getOriginCapture ( )
inline

◆ getOriginCapture() [2/2]

wolf::CaptureBaseConstPtr wolf::CaptureMotion::getOriginCapture ( ) const
inline

◆ isMotion()

bool wolf::CaptureMotion::isMotion ( ) const
inlineoverridevirtual

Is a motion if there is motion detected.

Returns
true if the capture is of type motion, false otherwise.

Reimplemented from wolf::CaptureBase.

◆ printHeader()

void wolf::CaptureMotion::printHeader ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream,
std::string  _tabs = "" 
) const
overridevirtual

Print the header information of the capture.

Parameters
depthThe depth of the header.
factored_byWhether to include factors in the print.
metricWhether to print metric information.
state_blocksWhether to print state blocks information.
streamThe output stream to print to.
_tabsThe tabs to use for indentation.

Reimplemented from wolf::CaptureBase.

◆ setCalibrationPreint()

void wolf::CaptureMotion::setCalibrationPreint ( const Eigen::VectorXd &  _calib_preint)
inline

◆ setData()

void wolf::CaptureMotion::setData ( const Eigen::VectorXd &  _data)
inline

◆ setDataCovariance()

void wolf::CaptureMotion::setDataCovariance ( const Eigen::MatrixXd &  _data_cov)
inline

◆ setOriginCapture()

void wolf::CaptureMotion::setOriginCapture ( CaptureBasePtr  _capture_origin_ptr)
inline

The documentation for this class was generated from the following files: